package day05;

public class ForDemo {
    public static void main(String[] args) {
    //累加和:1+2+3+4+..+100=?
        /*
        int sum = 0;
        for (int i=1;i<=100;i++){
            sum += i;
        }
        System.out.println(sum);

         */
        /*
        for (int num =1 ;num <=9 ; num++){
            if (num==4){    //在某种特定条件下,提前结束循环
                break;      //跳出循环  break搭配着if使用
            }
            System.out.println(num+"*9="+num*9);

        }
        */
        for (int i =1; i<=5;i++){
            for (int j=1;j <=i;j++){
                System.out.print("*");
            }
            System.out.println();
        }



    }
}
